Skip to content

fix(core): strip leaked build-script env from nested eBPF cargo call#53

Merged
sirantd merged 1 commit into
mainfrom
fix/ebpf-build-lock-deadlock
Jul 8, 2026
Merged

fix(core): strip leaked build-script env from nested eBPF cargo call#53
sirantd merged 1 commit into
mainfrom
fix/ebpf-build-lock-deadlock

Conversation

@sirantd

@sirantd sirantd commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to fix(core): give nested eBPF build.rs cargo invocation its own target dir #52: that fix resolved the cargo target-dir lock deadlock, but exposed a second bug — the nested cargo +nightly build --package oom-watcher-ebpf call in build.rs inherits LD_LIBRARY_PATH/RUSTC/RUSTUP_TOOLCHAIN from the outer build-script environment. LD_LIBRARY_PATH in particular pointed the nested rustc at a mismatched librustc_driver, failing rustc -vV with an undefined-symbol error on both amd64 and arm64 in the release workflow.
  • Fix: strip those three env vars before spawning the nested cargo process.

Test plan

  • docker build --target builder --platform linux/arm64 . locally — completes cleanly in ~3 min, eBPF build succeeds, binary found and copied
  • Merge and confirm the Release workflow's native-arch build jobs complete end to end

Cargo sets LD_LIBRARY_PATH/RUSTC/RUSTUP_TOOLCHAIN for build scripts to
point at the outer build's own rustc/sysroot. Inherited as-is by the
nested `cargo +nightly build --package oom-watcher-ebpf` invocation,
LD_LIBRARY_PATH made its rustc load a mismatched librustc_driver,
failing `rustc -vV` with an undefined-symbol error on both archs.
Verified locally: `docker build --target builder --platform linux/arm64 .`
now completes cleanly in ~3 minutes.
@sirantd sirantd merged commit 3e8fb3c into main Jul 8, 2026
6 checks passed
@sirantd sirantd deleted the fix/ebpf-build-lock-deadlock branch July 8, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant